package com.day21.ex01;

import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;

public class SendDemo {
    public static void main(String[] args)throws IOException {
        DatagramSocket ds=new DatagramSocket();
        byte[] bys="hello,udp,我来了".getBytes();
        DatagramPacket dp= new DatagramPacket(bys,bys.length, InetAddress.getByName("192.168.1.66"),10086);
        ds.send(dp);
        ds.close();
    }
}
